<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <script src="../vue.js"></script>
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <!-- 页面上的输入想要影响数据，view=>model,ipt的值要影响到data中的变量-->
      姓：<input type="text" v-model="firstName" /> <br />
      名：<input type="text" v-model="lastName" /> <br />
      全名: <span>{{firstName+lastName}}</span>
      <!-- 模板语法的 {{}}里面尽量简单 -->
      <!-- <input type="text" v-bind:value="firstName+lastName" /> -->
      <!-- {{}}内可以写js表达式 
        表达式？  语句
        表达式：a  b+c  x===y?"a":"b"
        语句：if(){}  for(){}
      -->
    </div>
    <script>
      var app = new Vue({
        el: "#app",
        data: {
          num1: 8,
          num2: 10,
          firstName: "老",
          lastName: "六",
        },
        methods: {
          demo() {
            return 1;
          },
        },
      });
    </script>
  </body>
</html>
